#Encoding.default_internal="UTF-8"
# a = "/*  */ abcdefghijklmn" 

# p a[a.index('*/')+3..-1]




# def deleteJavaComment(dir)
# 	#current_dir = dir

# 	Dir.foreach(dir) do |d|
# 	#p d
# 		if File.directory? dir + '/' +d 
# 			p d
# 			deleteJavaComment(dir + '/' +d) if !d.eql? '..' and !d.eql? '.'
# 		elsif File.file? dir + '/' +d  #and d.rindex('.java') > 0
# 			#p d
# 		else
# 			#p d
# 		end
# 	end
# end
require 'find'
dir = 'D:\java\classes.src'

Find.find(dir) do |path|
	if path.include?(".java")  and File.file? path

		new_file = File.open(path + 'c',"w")
		#puts new_file.methods
		file = File.foreach(path) do |line| 
			content = line
			content = line[line.index('*/')+3..-1] if line.index('/*') != nil and line.index('*/') != nil
			new_file.write(content)
		end
		new_file.close
	end
end